﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;


namespace MedVis_MidiController
{
    public enum MidiControllerType
    {
        Knopf,
        Schieberegler
    }
    public enum MidiControllerFunctions
    {
        Keine,
        Scrolling,
        WindowCenter,
        WindowWidth,
        Zoom,
        Verschieben_Links_Rechts,
        Verschieben_Oben_Unten,
        Durch_Vordefinierte_Windows_Wandern,
    }
    public enum MidiControllerFunctionParameterType
    {
        Prozent,
        Absolut
    }

    [XmlType("MidiControllerSettings")] // define Type
    public class MidiControllerSettings
    {
        [XmlAttribute("ControlID", DataType = "int")]
        public int controlNumber { get; set; }
        public MidiControllerFunctions func { get; set; }
        public Point loc{ get; set; }
        public MidiControllerFunctionParameterType functionParameterType { get; set; }
        public int functionParameter { get; set; }
        public byte lastKnownValue { get; set; }
        public MidiControllerType type { get; set; }


        public MidiControllerSettings(byte controlNumber)
        {
            this.controlNumber = controlNumber;
            this.func = MidiControllerFunctions.Keine;
            this.type = MidiControllerType.Knopf;
            this.functionParameterType = MidiControllerFunctionParameterType.Prozent;
            this.functionParameter = 100;
            this.lastKnownValue = 63;
            this.loc = new Point(0,0);
        }
        public MidiControllerSettings()
            : this(255)
        {
        }



    }
}
